﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Divisible
{
    class Program
    {
        static void Main(string[] args)
        {
            List<int> nums = new List<int>();

            for (int i = 1; i <= 100; i++)
            {
                nums.Add(i);
            }

            var divisible = nums.FindAll(x => x % 3 ==0 && x % 7==0);
            Console.WriteLine("Lamba expr result:");
            foreach (var item in divisible)
            {
                Console.Write(item + " ");
            }

            var linqResult =
                from int number in nums
                where number % 3 == 0 && number % 7 == 0
                select number;
            Console.WriteLine("\n\nLINQ query result:");
            foreach (var item in linqResult)
            {
                Console.Write(item + " ");
            }
            Console.WriteLine();
        }
    }
}
